home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 5 / MacMania 5.toast / / Tools&Utilities / Rainbow Demo v1.3a / Appendices next >
Text File  |  1996-09-06  |  12KB  |  433 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18. Appendices
  19. ----------
  20.  
  21.  
  22.  
  23. A - Getting your ROMs/files onto your Mac
  24. -----------------------------------------
  25.  
  26.  
  27. IMPORTANT: Please read these instructions carefully. The author will not accept 
  28. any responsibility for any damage or loss of data resulting from the advice
  29. given here.
  30.  
  31.  
  32. This is done in two steps - creating a disk file of the ROM image and then
  33. transferring over to the Mac.
  34.  
  35.  
  36.  
  37. Step One
  38. --------
  39.  
  40.  
  41. Creating a DOS file of the OS ROM image is simple. If you have a 400 or 800, the
  42. OS ROM is 10K in size. Run the following program
  43.  
  44.  
  45.  
  46.  5 REM CREATE 10K 400/800 ROM FILE - 10240 BYTES
  47.  
  48. 10 OPEN#1,8,0,"D:ROM10K"
  49.  
  50. 20 FOR K=55296 TO 65535 : PUT#1,PEEK(K) : NEXT K
  51.  
  52. 30 CLOSE #1
  53.  
  54.  
  55. which saves the ROM onto disk. For XL machines, run the following. The ROM is 
  56. 16K in size. 
  57.  
  58. NOTE: Only the full shareware version emulates the 800XL.
  59.  
  60.  
  61.  5 REM CREATE 16K XL OS ROM FILE - 16384 BYTES
  62.  
  63. 10 OPEN#1,8,0,"D:ROM16K"
  64.  
  65. 20 FOR K=49152 TO 53247 : PUT#1,PEEK(K) : NEXT K
  66.  
  67. 30 POKE 54017,PEEK(54017)-128
  68.  
  69. 40 FOR K=20480 TO 22527 : PUT#1,PEEK(K) : NEXT K
  70.  
  71. 50 FOR K=55296 TO 65535 : PUT#1,PEEK(K) : NEXT K
  72.  
  73. 60 CLOSE #1
  74.  
  75.  
  76.  
  77. To create an image of BASIC use
  78.  
  79.  
  80.  5 REM CREATE 8K BASIC FILE - 8192 BYTES
  81.  
  82. 10 OPEN#1,8,0,"D:BASIC"
  83.  
  84. 20 FOR K=40960 TO 49151 : PUT#1,PEEK(K) : NEXT K
  85.  
  86. 30 CLOSE #1
  87.  
  88.  
  89.  
  90. Step Two
  91. --------
  92.  
  93.  
  94. That's the easy bit. This step involves transferring the files over to the Mac. 
  95. Luckily the modem port on the Mac is a RS232 port, so you'll need an 850 Interface
  96. Module...
  97.  
  98.  
  99.    [Atari computer] --> [850 Module]  ===== cable =====>  [Mac]
  100.           +
  101.      [Disk drive]
  102.  
  103.  
  104. and a cable. Don't worry, this cable is very easy to make.
  105.  
  106. Below is a diagram of the ports, looking INTO THE BACKS of the Mac and
  107. 850 unit.
  108.  
  109.  
  110.  
  111.       Mac 8 pin mini-modem             Atari 850 9 pin D connector
  112.  
  113.  
  114.          • 8     • 7     • 6                       • 5  • 4  • 3  • 2  • 1
  115.  
  116.         • 5      • 4      • 3                        • 9  • 8  • 7  • 6
  117.  
  118.              • 2     • 1
  119.  
  120.  
  121.      
  122. You only need to make 2 connections...
  123.  
  124.  
  125.      Mac modem                850 port (PORT 1)
  126.      ---------                -----------------
  127.  
  128.       PIN 8 (GND)                  PIN 5 (GND)
  129.       PIN 5 (RECEIVE DATA)         PIN 3 (SEND DATA)
  130.  
  131.  
  132.  
  133. Ideally you should make a cable with a 9-pin D connector, 8 pin mini DIN line plug
  134. and some 2 core electrical cable. But you can probably get away with just using 
  135. 2 pieces of insulated wire (about a metre in length) and pushing the ends 
  136. into the sockets.
  137.  
  138.  
  139. Now to send a file from your Atari 8bit to the Mac. Type in the following program 
  140. in Atari BASIC and save to disk.
  141.  
  142.  
  143. 5 REM XFER - TRANSFER A FILE TO MAC
  144.  
  145. 10 POKE 559,0
  146.  
  147. 20 REM SET UP HEX TABLES FIRST
  148.  
  149. 25 DIM A(256),B(256)
  150.  
  151. 30 FOR K=0 TO 255
  152.  
  153. 40 HI=INT(K/16) 
  154.  
  155. 50 LO=K-HI*16
  156.  
  157. 55 HI=HI+48   :  REM now convert hex to ASCII...
  158. 56 LO=LO+48
  159.  
  160. 60 IF HI>57 THEN HI=HI+7
  161.  
  162. 70 IF LO>57 THEN LO=LO+7
  163.  
  164. 80 A(K+1)=HI
  165.  
  166. 90 B(K+1)=LO
  167.  
  168. 100 NEXT K
  169.  
  170. 110 REM
  171.  
  172. 200 REM NOW SEND THE FILE!
  173.  
  174. 210 OPEN #4,4,0,"D:ROM10K" : REM open file to send
  175.  
  176. 220 OPEN #7,8,0,"R1:"
  177.  
  178. 230 XIO 36,#7,14,0,"R1:"
  179.  
  180. 240 FOR  K=1 TO 10240 : REM send all the bytes in the file
  181.  
  182. 250 GET#4,BYTE
  183.  
  184. 260 PUT#7,A(BYTE+1)
  185.  
  186. 270 PUT#7,B(BYTE+1)
  187.  
  188. 280 NEXT K
  189.  
  190. 290 CLOSE #7
  191.  
  192. 300 CLOSE #4
  193.  
  194. 310 POKE 559,34
  195.  
  196.  
  197.  
  198. Lines 25 to 100 set up hexadecimal character tables for bytes 0 to 255.
  199.  
  200. Line 10 switches off the screen which speeds up transfer by 33%. Line 310 turns
  201. it back on. You may want to leave the screen turned on (i.e. omit line 10) in case
  202. there are any error messages. Once it's working, leave line 10 in.
  203.  
  204. Lines 220 and 230 set up PORT 1 for output to the Mac at a transfer rate of 9600
  205. bits per second (baud rate). A loop then reads the file from disk a byte at 
  206. a time and sends it in hex to the Mac.
  207.  
  208. Lines 210 and 240 are set up above ready to transfer the 10K OS ROM file.
  209.  
  210. BUT DON'T RUN THIS YET!
  211.  
  212. You now need some kind of communications software for your Mac to receive the 
  213. data. My favourite is Zterm which is shareware and widely available.
  214. Set Zterm to 9600 baud rate. Make sure the 'capture' window is clean of
  215. all spurious text. 
  216.  
  217.  
  218. NOW REBOOT YOUR ATARI AND RUN THE TRANSFER PROGRAM.
  219.  
  220.  
  221. Your DOS boot-up disk must contain the AUTORUN.SYS file which loads up
  222. the RS232 handler code. This file is created using SETUP.COM which comes
  223. with Atari DOS 2 or later. Without the RS232 handler booted, the XFER program
  224. will return an error code 130 at line 220. All being well, you should hear a
  225. high pitched squeal just before getting the READY prompt.
  226.  
  227. On running XFER, you should see the bytes displayed in the capture window in hex. 
  228. The complete transfer will take some minutes. When finished, select entire text 
  229. and save the selection with the name UNHEX.IN and place the file in the same 
  230. folder as the UNHEX application.
  231.  
  232. Finally launch UNHEX. This application reads UNHEX.IN and creates the binary
  233. file UNHEX.OUT, stripping any carriage returns (byte = 13) in UNHEX.IN. (These
  234. carriage returns are added by Zterm, not the RS232 handler.)
  235.  
  236. Pay attention to the number of bytes unhexed... it should EXACTLY MATCH THE
  237. NUMBER SENT (see line 240 above). If not, repeat the entire process (quit Zterm 
  238. and re-boot your Atari just to be sure).
  239.  
  240. If the transfer is unreliable too often, try dropping the baud rate to 4800 in
  241. Zterm and change the 14 in line 230 to 13.
  242.  
  243. If it's the 400/800 OS, rename UNHEX.OUT as OP_SYSTEM. All being well, you 
  244. can launch Rainbow and get the blue 'Memo Pad' screen up.
  245.  
  246.  
  247. Hooray!
  248.  
  249.  
  250. Advertisement: The full shareware version comes with an application
  251. called TinyTerm. Using this you will be able to transfer whole disk
  252. images from your 8bit to the Mac in under 5 minutes. You will still
  253. need the 850 interface module and cable.
  254.  
  255.  
  256.  
  257. B - Rainbow technical details
  258. -----------------------------
  259.  
  260.  
  261. For those who like to revel in technical specs, here's the list for Rainbow.
  262.  
  263. Hardware:
  264.  
  265.   • NMOS 6502 processor 
  266.   • Accepts 400/800 and 800XL/130XE OS 
  267.   • 48K RAM for 400/800 machines; full 64K RAM for 800XL; 128K RAM for 130XE
  268.   • Emulates the 5200 video console system
  269.   • NMI and IRQ interrupt emulation
  270.   • 8K and 16K cartridge support; 16K and 32K cartridges for 5200
  271.   • 16K Super Cartridge support
  272.   • Low level SIO emulation allows access to virtual disk images
  273.   • Supports single and enhanced density images and ATR images
  274.   • Disk drives D1: and D2: available
  275.   • Import/export files to and from your Mac hard disk
  276.   • Full keyboard
  277.  
  278. Graphics:
  279.  
  280.   • 256 Atari colours
  281.   • Complete playfield generation (ANTIC modes 2 to 15)
  282.   • Narrow, Normal and Wide playfields
  283.   • GTIA support giving 3 extra colour modes
  284.   • Colour artefacting in GRAPHICS 8
  285.   • Display List Interrupts  
  286.   • Player/Missile Graphics
  287.   • Full Player/Missile/Playfield collision detection
  288.   • Player/Missile priorities (mutually exclusive and non-exclusive)
  289.   • Fine scrolling
  290.   • PAL/NTSC screen option
  291.  
  292. Others:
  293.  
  294.   • POKEY timers 1, 2 and 4
  295.   • Sound with 4 channels of pure tones and improvised noise
  296.   • Four joysticks support using keypad
  297.   • Four paddles support using mouse  
  298.  
  299.  
  300.  
  301. C - Why won't this game work???
  302. -------------------------------
  303.  
  304.  
  305. Okay, you've tried everything and your favourite game still won't run properly.
  306. Go through the following checklist.
  307.  
  308.   - Try the game with and without BASIC inserted. On the XL, keep the OPTION
  309.     key (Shift and num lock on the Mac) pressed to disable BASIC when re-booting.
  310.  
  311.   - Does it need an XL/XE machine?
  312.  
  313.   - Does it need the very old 'A' version of the 400/800 OS? Some software did
  314.     do naughty things like jumping in and out of OS routines when they should 
  315.     have used vectors.
  316.  
  317.   - If you're trying to run a BINARY FILE, then the loader/DOS you use may affect
  318.     it. Some games I've tried simply won't run using the L option in Atari 
  319.     DOS 2.5 but do run successfully on another e.g. SmartDOS. The best loaders 
  320.     are the tiny ones which take only a second to boot up. Experiment and see 
  321.     which work best for you.
  322.  
  323.   - Some games may need the 'Every' frame option to work properly or for the
  324.     graphics to behave and look right.
  325.  
  326.   - Are you sure your file or disk image is not corrupted?
  327.  
  328.   - Turn 'Cheat Mode' off.
  329.  
  330.   - Have you got the correct joystick/paddle active?
  331.  
  332.   - If the screen seems unstable, try checking the the 'PAL' option under 
  333.     'TV' menu.
  334.  
  335.  
  336. If all this fails, then it's down to the limitations of the emulator. Although 
  337. Rainbow is a very good emulator, at the end of the day, it's just that... an 
  338. approximation of the real thing. 
  339.  
  340. Some games may include illegal (or undocumented) 6502 machine code instructions
  341. to protect the code against hackers. Since they are undocumented, their 
  342. behaviour is not well known but a good attempt has been made to include all of
  343. them in Rainbow, the information coming from a number of sources (with inevitable
  344. contradictions...). This is just another possible reason why some games won't
  345. run properly.
  346.  
  347.  
  348.  
  349.  
  350. D - The 'Atari computer crash' alert box
  351. ----------------------------------------
  352.  
  353.  
  354. Now and again, you will encounter this alert box. Although it looks horribly
  355. ominous, it's nothing to get worried about and no damage is done to Rainbow 
  356. or your Mac.
  357.  
  358. It means the CPU has just executed an illegal opcode which is known to freeze 
  359. the machine. So rather than let the emulator just sit there and do nothing, 
  360. it informs you of this.
  361.  
  362. The only way out of such a crash is to switch the emulator off and on, i.e.
  363. re-boot. 
  364.  
  365. If you hold the Control key down on the re-boot, the cartridge is removed and
  366. drive#1 turned off. This is useful to get out of a continual crash sequence,
  367. e.g. bad boot disk.
  368.  
  369. Pressing SYSTEM RESET to get out of a game can often result in a 'crash' 
  370. and is nothing to worry about. Pity Rainbow can't recreate some of those 
  371. spectacular graphics when a real 8 bit crashes... I used to sit there for hours
  372. engrossed in crashing the machine just to see the pretty colours.
  373.  
  374. Ahem...
  375.  
  376.  
  377.  
  378. E - Rainbow icons
  379. ----------------
  380.  
  381.  
  382. Use ResEdit to get your existing files to display the colourful Rainbow icons.
  383. The creator code is 'RBOW' and useful types are 'DSKS', 'DSKE' and 'CART'. Leave
  384. the 'Inited' box unchecked on exit. The required icon should appear immediately on
  385. the Desktop (if it was generic before). Else you may have to re-build the desktop.
  386.  
  387.  
  388.  
  389. F - Using the 5200 emulation mode
  390. ---------------------------------
  391.  
  392.  
  393. "Smoke 'em if you've got 'em"
  394.  
  395. Those fortunate enough to have access to Atari 5200 ROM images will find this
  396. new feature quite fun. You will also need the 2K monitor ROM image.
  397.  
  398. The 5200 is a stripped down 400/800 with 16K RAM, ANTIC, GTIA and POKEY. The keypad
  399. only has the 10 digit keys, # (SHIFT 3), * (SHIFT 8) and RESET, START and PAUSE (
  400. mapped to where the XL HELP key is on Rainbow).
  401.  
  402. ROM images are either 16K or 32K in size. Rainbow does not mimic the analogue
  403. nature of the 5200 joysticks but this should not matter for most games. 
  404.  
  405. Easy way to get the ROM:- Take one 5200 and remove covering to reveal
  406. the circuit board. Locate the ROM (same size as other Atari ROM chips and has
  407. 'ATARI' written on it. Pull it out. Now get an ordinary Atari 400/800 cartridge, e.g.
  408. BASIC. Take out the left ROM chip and put the 5200 ROM in its place. Put cartridge in
  409. Atari computer and turn it on. If you were lucky, you will go into the MEMO PAD or
  410. TEST ROM or DOS depending on your computer. If it crashes, put the left ROM chip back 
  411. into the BASIC cartridge and replace the right chip with the 5200 ROM. Booting up into
  412. DOS allows you save the ROM area ($A000 to $BFFF). Transfer this over to the Mac
  413. as per usual and use HexEdit to surgically remove the 5200 ROM image. You can't
  414. miss it, it's either at offset 800h-FFFh or 1800h-1FFFh. Save the 2K part as 'OP_5200'
  415. and away you go.
  416.  
  417. Many of the 90 or so 5200 games play okay... however there are still some 
  418. joystick/movement problems with about 10 - 15 games.
  419.  
  420.  
  421.  
  422. ----------------------------------------------------------------------------------
  423.  
  424. Comments and suggestions to...
  425.  
  426. E-mail: jx91@cityscape.co.uk
  427. WWW   : http://www.cityscape.co.uk/users/jx91/emulators.html
  428.  
  429. Rainbow (c) 1995-6 by Chris Lam.
  430.  
  431. ----------------------------------------------------------------------------------
  432.  
  433.